// components/artu/index.js
Component({
  data: {
    isShow: false
  },
  lifetimes: {
    attached() {
      const token = getApp().token
      this.setData({
        isShow: !!token
      })
      if (!this.data.isShow) {
        const solist = getCurrentPages()
        const oulist = solist[solist.length - 1]
        console.log(oulist)
        wx.redirectTo({
          url: `/pages/login/index?returnUrl=/${oulist.route}`
        })
      }
    }
  }
})
